New HTML to split log and command entry to fix issue #804.#835
Conversation
JavaScript polling log viewer
Command recall and inline eraseing.. asynchronous to log.
Script enabled to reload log file asynchrously. Hook for potential future MIP-O-Meter added. Fix bug in power handling where cancel shutdown anyway
There was a problem hiding this comment.
It doesn't seem to work! :(
Well, it WORKS, yes, but it doesn't seem to fix the problem as described in GitHub Issue #804!!
Yes, it can refresh the log display to show the new lines, and yes, it rejects an auto-refresh interval of 0 (zero), but all of the buttons and input fields are all at the bottom of the page/screen!
When the number of lines is set to '0' (zero) (in order to display the complete log) and the autor-efresh interval is set to 1 (the new minimal allowed), the log display refreshs so frequently (so quickly!) that you can't reach the buttons and thier input fields at the botton of the page to set a slower refresh rate or shorter/smaller #of log lines!
It's basically the same bug that GitHub Issue #804 described!
I thought you were going to move the buttons and input fields currently at the bottom of the screen/page to the TOP of the page/screen to fix the described problem! Yes? I seem to recall that you actually did do that at one point in the recent past. Yes?
Or was I halllucinating?
It works fine now! (Sorry about that! My bad!) Two questions however before accepting this Pull Request:
#2 is the only one I'm really interested in having answered before accepting/merging your PR. #1 is just a curiosity. It would really be nice to have if possible for idiots like me who forget to clear their browser cache. Thanks! |
|
I'm not aware of a way of fixing the cache issue as it's due to the Hercules HTTP server being very simple (brain dead). On the command line it's trivial. In html/hercules.html swap the cmd and main "frame" lines around and on rows="95,*,100" swap the * and 100 around to rebalance the rows.
It's truly trivial to rework any of the layout now- so let's get it right before you accept the PR |
Interesting. I've always preferred having the command line at the top of my 3270 terminals, so a quick Ctrl+Home, while editing the file, would immediately position my cursor to the beginning of the command line. Is there maybe a simple boolean [x] checkbox toggle we could introduce to make that setting customizable to user preference? And while I'm on the subject, I'm now wondering if a user's preferences (or previously used values?) could maybe be preserved/saved somewhere? I'm thinking maybe a new Oh! One other minor(?) cosmetic thing I forget to ask you about: I like the ability to set Dark/Light mode, but it seems to only affect (apply to) the log display. Shouldn't it affect the entire screen/page? (VERY LOW priority / optional! If it would take too much effort on your part, then forget it!)
Will give it a go and get back to you. Thanks for everything you've done so far, Andy! Our HTTP Server screen is looking much better now! THANK YOU!! |
|
I can easily build in a top/bottom button in the cmd window to allow a user to switch it over. This would also have persistence just like the current theme, refresh and command history - this is held at the browser so the user retains their settings between sessions on that browser. Give me a couple of days - don't accept this PR as I'll change some of the files.Back to the caching. A simple fix to httpserve to add an ETAG and handle the headers required would fix that. I think it's worth doing, otherwise when we switch the UI people may get confused - let me work on this. I'll do a separate PR for this change. |
How much effort would it take (and how much complication would it introduce) to make it not so brain dead? If it would take more effort than it's its worth (or make our server HTTP code more complicated and fragile than its worth) then of course forget it. (KISS, right?)
Thanks! I just tried it and I like it! But then that's just me too. Others may like it at the bottom like you. So if you can do the top/bottom button thing, great! Otherwise just leave it as is.
10-4.
10-4. |
|
I can fix the caching code in httpserv cleanly, and easily, but due to the legacy cache expiry time header used it won't invalidate the old browser copy immediately because the browser won't even ask the server until the cache time expires. However, we should fix it now as it'll save pain next time. Working on it now.... |
|
@Fish-Git This is not directly related to this PR but whilst doing a mini regression test I discovered what may be another --noui issue. Could you try this on your windows build on the master (as shipping version).? Start in --noui with stdin from the nul device. Start the original HTTP console and then select "Version Info" in the left hand tasks window. On my LINUX build (both develop and master) it prints the "Hercules Version Information" and Hercules simply dies - no message no nothing....... |
Took a look at this and looks related to when the socket is assigned handle 0 (which is technically valid, since script.c closes stdin). Updating the Line 811 in 841515e (Note: I have not checked the rest of the code to see whether this logic appears elsewhere1) Footnotes
|
When I start hercules with --noui and stdin redirected from the nul device, after processing its configuration and script files, Hercules immediately quits and exits, giving me zero opportunity to even try to connect to the HTTP Server! Lines 1832 to 1849 in ee86c4d This was one of the things I fixed with commit 9617672. |
|
@gottfriedleibniz thank you for looking at this. I will plug your suggestion in and give it a go. It certainly sounds like a probable cause of what I am seeing. @Fish-Git in my case I had an os (tried with vm and mvs) running and when I went to the HTTP console and clicked "version information" - bang, all gone. |
But how did you even manage to get any os running in the first place?! As I said, starting hercules (current 4.9.1 |
|
Hercules.rc So for VM370
|
|
@gottfriedleibniz yes that's fixed that issue. I wonder if something similar explains why when running in --noui, stdin must be redirected to nul otherwise it still tries to read from the controlling terminal. |
Ah. Yes of course. I'll give that a try and report back. |
Seems to work fine for me! I click the "Version" link in the "Tasks" column and it displays the version information, and Hercules keeps on chugging along just fine. The --noui issue you described does not occur for me. |
|
P.S. Don't forget to let me know when this PR is ready for merging!1 Footnotes |
Uses JavaScript for separate command entry via cmd.html (new frame in hercules.html) and asynchronous pooling syslog viewer using updated JSON API so only changed lines are pulled on each refresh.
Command line recall and log scrolling is supported